HTML 您所在的位置:网站首页 HTML <img> src Attribute HTML

HTML

2024-06-02 06:15| 来源: 网络整理| 查看: 265

The HTML src Attribute is used to specify the URL of external JavaScript file. The External JavaScript file is used to run on the same script on several pages on a website. We can save the JavaScript file with an extension of .js. We can refer the external script using the src attribute of the element. 

Syntax: 

Attribute Values: It contains single value URL which specifies the URL of the external JavaScript file. There are two types of URL link which are listed below:

Absolute URL: It points to another webpage. Relative URL: It points to other files of the same web page.

Below example illustrates the src attribute in HTML: 

Example: 

HTML

           HTML  script src Attribute                     GeeksForGeeks                     HTML script src Attribute                           Submit    

Output :

  

Supported Browsers: The browser supported by HTML src attribute are listed below:

Google Chrome 1 and above Edge 12 and above Firefox 1 and above Internet Explorer Safari Opera

M

ManasChhabra2 Improve Next Article HTML | type Attribute Please Login to comment...


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有